<html>
<head>
</head>
<body>
<form name="myform" action="ShowMap.php" method="POST">
<div align="center">

<?php
include ("connect.php");
$dbname = 'Transportation';
mysql_select_db($dbname);
$page_title = "Abu Dhabi Transportation Website - Schedule Search";

$leftMenu = array
	(
		 "Home" => "index.php",
		"Routes" => "routes.php",
		"Schedule" => "Schedule.php",
		"Stops" => "Stops.php",
		"How To Go There" => "banner.php",
	);
	

$content = "Please select the Route: <br/><br/><br/>";

$q = "select * from busroutes ORDER BY  `busroutes`.`BusID` ASC";
$result = mysql_query($q);


$content .= 'Route: &nbsp';


$content .= '<select name="mydropdown1">';
while ($row = mysql_fetch_array($result)) 
{
$q1="select * from busstops where Name='".$row{'Start'}."'";
$result1=mysql_query($q1);
$row1 = mysql_fetch_array($result1);


$q2="select * from busstops where Name='".$row{'End'}."'";
$result2=mysql_query($q2);
$row2 = mysql_fetch_array($result2);

$content .= '<option value="'.$row{'CodeLevel'}.' SPLIT '.$row{'RouteCode'}.' SPLIT '.$row{'BusID'}.' from '.$row{'Start'}.' To '.$row{'End'}.' SPLIT '.$row1{'XCord'}.','.$row1{'YCord'}.' SPLIT '.$row2{'XCord'}.','.$row2{'YCord'}.' SPLIT '.$row1{'Name'}.' SPLIT '.$row2{'Name'} .'">'. $row{'BusID'}. ' : '. $row{'Start'}. ' To '. $row{'End'}.'</option>';



}
$content .= '</select>';
$content .= '<br/><br/>';

mysql_close($connect);
$content .= '<br/><br/><br/><br/>';

$content .= '<input type = "submit" />';

include("default_layout.php");
?>





</div>
</form>
</body>
</html>